package com.huabo.fxgl.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author LiYe
 * @since 2022-08-01
 */
@Data
@ToString
//@TableName(value = "TBL_RISK_ASSPLAN")
@TableName(value = "TBL_RISK_ASSPLAN", resultMap = "RM_RISK_ASSPLAN")
public class RiskAssplan implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @TableId
    private BigDecimal assplanid;
    /**
     * 计划编号
     */
    private String plancode;
    /**
     * 计划名称
     */
    private String planName;
    /**
     * 计划开始时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime startDate;
    /**
     * 计划结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime endDate;
    /**
     * 计划状态
     */
    private String planStatus;
    /**
     * 公司ID
     */
//    private String unit;
    @TableField(exist = false)
    private Organization organization;

    private String unit;
    /**
     * 备注
     */
    private String memo;
    /**
     * 计划描述
     */
    private String plandes;
    /**
     * 计划类型
     */
    private String planType;
    private String recorder;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime recorddate;
    private String asshead;
    /**
     * 评估标准ID
     */
    private RiskAssessmentstd assstd;
    private String version;
    @TableField(exist = false)
    private List<RiskAssplanRisk> riskAssplanRiskList;//一个评估计划可能映射多个风险
//    @TableField(exist = false)
//    private Organization organization;

    @TableField(exist = false)
    private Integer count = 0;
    @TableField(exist = false)
    private Integer count1 = 0;
    @TableField(exist = false)
    private Integer count2= 0;
    @TableField(exist = false)
    private Integer count3= 0;
    @TableField(exist = false)
    private Integer count4= 0;
    @TableField(exist = false)
    private Integer count5= 0;

}
